from pydantic import BaseModel

class input_data(BaseModel):
    # hzc
    data: list = [{
        'DvpUnit_Name': 'str',
        'Year': 'str',
        'StimType_Name': 'str',
        'Stim_WellNumber_Valid': 'float',
        'Stim_WellValidRatio': 'float',
        'Stim_ValidPeriod_Average': 'float',
        'Stim_IncreOil_Average': 'float',
        'Stim_Cost': 'float',
        'Oil_CommodityRatio': 'float',
        'Oil_Price': 'float',
        'Money_Discount': 'float',
        'Remark': 'str',
    }]
    oilcost: list = [{
        "DvpUnit_Name": "String",
        "Year": "String",
        "Oil_OprCost": "double",
        "FuelCost": "double",
        "Power_Cost": "double",
        "FluidDispose_Cost": "double",
        "OilDisplaceAgent_Cost": "double",
        "NGLRecovery_Cost": "double",
        "Transp_Cost": "double",
        "WellTest_Cost": "double",
        "Other_Cost": "double",
        "Depre_Cost": "double",
        "Remark": "String"
    }]
    ratio: list = [{
        "DvpUnit_Name": "String",
        "Year": "String",
        "OilSale_TotalTaxRatio": "double",
        "AddedValue_TaxRatio": "double",
        "Resource_TaxRatio": "double",
        "EduAdd_TaxRatio": "double",
        "CityDvpAdd_TaxRate": "double",
        "Income_TaxRate": "double",
        "ManageCost_Ratio": "double",
        "Remark": "String"
    }]
    delete: list = [{
        'DvpUnit_Name': 'str',
        'Year': 'str',
        'StimType_Name': 'str'
    }]
    # add : list = [{"User_ID":'str',"Proj_ID":'str',"DvpUnit_Name":"str","Year":'str',
    #                "StimType_Name":'str',"Stim_WellNumber_Valid":'int',"Stim_WellValidRatio":'float',
    #                "Stim_ValidPeriod_Average":"float",
    #                "Stim_IncreOil_Average":'float',"StimCost_Average":'float',"Oil_OprCost":'',"Oil_Price":'float',
    #                "StimOil_CommodityRatio":'float',"OilSale_TotalTaxRatio":'float',"Money_Discount":'float',"Remark":'str'
    #                   ,"year_dvpunit_oilprodcost":{"DvpUnit_Name":"String","Year":"String","Oil_OprCost":"double"
    #                                                ,"FuelCost":"double","Power_Cost":"double","FluidDispose_Cost":"double"
    #                                                ,"OilDisplaceAgent_Cost":"double","NGLRecovery_Cost":"double","Transp_Cost":"double"
    #                                                ,"WellTest_Cost":"double","Other_Cost":"double","Depre_Cost":"double"
    #                                                ,"Remark":"String"},
    #                "year_dvpunit_oilsalecost_ratio":{"DvpUnit_Name":"String","Year":"String","OilSale_TotalTaxRatio":"double",
    #                                                  "AddedValue_TaxRatio":"double","Resource_TaxRatio":"double","EduAdd_TaxRatio":"double",
    #                                                  "CityDvpAdd_TaxRate":"double","Income_TaxRate":"double","ManageCost_Ratio":"double"
    #                    ,"Remark":"String"}}]
    #
    # delete : list = [{"User_ID":"str","Proj_ID":"str","DvpUnit_Name":"str","Year":"str"},]
    # modify : list = [{"User_ID":"str","Proj_ID":"str","DvpUnit_Name":"str","Year":"str",
    #                "StimType_Name":"str","Stim_WellNumber_Valid":"int","Stim_WellValidRatio":"float","Stim_ValidPeriod_Average":"float",
    #                "Stim_IncreOil_Average":"float","StimCost_Average":"float","Oil_OprCost":"float","Oil_Price":"float",
    #                "StimOil_CommodityRatio":"float","OilSale_TotalTaxRatio":"float","Money_Discount":"float","Remark":"str"
    #                      ,
    #                   "year_dvpunit_oilprodcost": {"DvpUnit_Name": "String", "Year": "String", "Oil_OprCost": "double"
    #                       , "FuelCost": "double", "Power_Cost": "double", "FluidDispose_Cost": "double"
    #                       , "OilDisplaceAgent_Cost": "double", "NGLRecovery_Cost": "double", "Transp_Cost": "double"
    #                       , "WellTest_Cost": "double", "Other_Cost": "double", "Depre_Cost": "double"
    #                       , "Remark": "String"},
    #                   "year_dvpunit_oilsalecost_ratio": {"DvpUnit_Name": "String", "Year": "String",
    #                                                      "OilSale_TotalTaxRatio": "double",
    #                                                      "AddedValue_TaxRatio": "double", "Resource_TaxRatio": "double",
    #                                                      "EduAdd_TaxRatio": "double",
    #                                                      "CityDvpAdd_TaxRate": "double", "Income_TaxRate": "double",
    #                                                      "ManageCost_Ratio": "double"
    #                       , "Remark": "String"}
    #                   }]

class out_data(BaseModel):
    input_d : list = [{
        "User_ID":"str",
        "Proj_ID":"str",
        "DvpUnit_Name":"str",
        "Year":"str",
        "StimType_Name":"str",
        "Stim_WellNumber_Valid":"int", # 有效井次
        "Stim_WellValidRatio":"float", # 有效率
        "Stim_ValidPeriod_Average":"float", # 平均有效期
        "Stim_IncreOil_Average":"float", # 平均措施增油
        "StimCost_Average":"float", # 平均作业成本
        "Oil_OprCost":"float", # 操作吨油成本
        "Oil_Price":"float", # 平均油价
        "StimOil_CommodityRatio":"float", # 原油商品率
        "OilSale_TotalTaxRatio":"float", # 平均销售税费率
        "Money_Discount":"float", # 资金贴现率
        "Remark":"str"
    }]


class my_save_out_data(BaseModel):
    data: list = [{
            "DvpUnit_Name": "str",
            "Year": "str",
            "StimType_Name": "str",
            "Stim_WellValidRatio": "float",
            "Stim_WellNumber_Valid": "float",
            "Stim_ValidPeriod_Average": "float",
            "Stim_IncreOil_Average": "float",
            "StimCost_Average": "float",
            # "StimOil_OprCost_Average": "float",
            "StimOil_CommodityRatio": "float",
            "StimOil_Gross_SalesIncome_Average": "float",
            "StimOil_Total_TaxRatio_Average": "float",
            "StimOil_Static_Gains_Average": "float",
            "StimOil_NPV_Average": "float",
            "StimOil_ROI": "float",
            "StimOil_NPVR": "float",
            "StimOil_FIRR": "float",
            "Stim_IncreOil_Critical_Average": "float",
            # "StimOil_Price_Critical_Average": "float",
            "Remark": "str",
            "Oil_Price": "float",
            "OilSale_TotalTaxRatio": "float",
            "Money_Discount": "float",
            "Oil_OprCost": "float",
            "StimOil_Price_Critical": "float",
            "StimOil_WellOprCost_Average": "float",
        }]

class save_out_data(BaseModel):
    """
    平均临界增油量,经济临界油价
    """
    add : list = [{
            "DvpUnit_Name": "str",
            "Year": "str",
            "StimType_Name": "str",
            "Stim_WellValidRatio": "float",
            "Stim_WellNumber_Valid": "float",
            "Stim_ValidPeriod_Average": "float",
            "Stim_IncreOil_Average": "float",
            "StimCost_Average": "float",
            # "StimOil_OprCost_Average": "float",
            "StimOil_CommodityRatio": "float",
            "StimOil_Gross_SalesIncome_Average": "float",
            "StimOil_Total_TaxRatio_Average": "float",
            "StimOil_Static_Gains_Average": "float",
            "StimOil_NPV_Average": "float",
            "StimOil_ROI": "float",
            "StimOil_NPVR": "float",
            "StimOil_FIRR": "float",
            "Stim_IncreOil_Critical_Average": "float",
            # "StimOil_Price_Critical_Average": "float",
            "Remark": "str",
            "Oil_Price": "float",
            "OilSale_TotalTaxRatio": "float",
            "Money_Discount": "float",
            "Oil_OprCost": "float",
            "StimOil_Price_Critical": "float",
            "StimOil_WellOprCost_Average": "float",
        }]
    delete : list = [{
        "DvpUnit_Name": "str",
        "StimType_Name": "str",
        "Year": "str"
    }]




